package com.feihao.demo01DateJDK8;

import java.time.LocalDate;
import java.util.Objects;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入年：");
        int year = scanner.nextInt();

        LocalDate of = LocalDate.of(year, 12, 31);

        /*//向前减一天：
        LocalDate localDate = of.minusDays(1);

        if (localDate.getDayOfMonth() == 28){
            System.out.println("是平年");
        }else {
            System.out.println("是闰年");
        }*/

        //判断当前年份最后一天是否是366---》润

        int dayOfYear = of.getDayOfYear();
        System.out.println(dayOfYear);

//        Objects


    }
}
